package com.example.springcloud.domain;

import java.io.Serializable;
import java.math.BigDecimal;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品信息对象 products
 * 
 * @author hx
 * @date 2025-02-14
 */
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "商品信息对象")
@Data
public class Products implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 商品ID */
    @ApiModelProperty(value = "商品ID")
    private Long productId;

    /** 商品标题 */
    @Excel(name = "商品标题")
    @ApiModelProperty(value = "商品标题")
    private String title;

    /** 当前售价 */
    @Excel(name = "当前售价")
    @ApiModelProperty(value = "当前售价")
    private BigDecimal currentPrice;

    /** 商品原价 */
    @Excel(name = "商品原价")
    @ApiModelProperty(value = "商品原价")
    private BigDecimal originalPrice;

    /** 商品图片地址 */
    @Excel(name = "商品图片地址")
    @ApiModelProperty(value = "商品图片地址")
    private String imageUrl;

    /** 关联商家ID */
    @Excel(name = "关联商家ID")
    @ApiModelProperty(value = "关联商家ID")
    private Long merchantId;

    /** 关联分类ID */
    @Excel(name = "关联分类ID")
    @ApiModelProperty(value = "关联分类ID")
    private Long categoryId;

    @Excel(isExport = false)
    @ApiModelProperty(value = "关联分类名称")
    private String categoryName;

    /** 关联地区ID */
    @Excel(name = "关联地区ID")
    @ApiModelProperty(value = "关联地区ID")
    private Long regionId;

    @Excel(isExport = false)
    @ApiModelProperty(value = "关联地区名称")
    private String regionName;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productId", getProductId())
            .append("title", getTitle())
            .append("currentPrice", getCurrentPrice())
            .append("originalPrice", getOriginalPrice())
            .append("imageUrl", getImageUrl())
            .append("merchantId", getMerchantId())
            .append("categoryId", getCategoryId())
            .append("regionId", getRegionId())
            .toString();
    }
}
